<?php
/**
 * Created by PhpStorm.
 * User: 彭奇
 * Date: 2018/9/26
 * Time: 20:33
 */
    $con=new PDO("mysql:dbname=test;host=127.0.0.1", "root", "");
    $con->exec("SET NAMES 'utf8';");
    $sql="INSERT INTO `pq_user`(`name`,`sex`,`age`)VALUES ('sam','男',18);";
    $res=$con->query($sql);